﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;

public class Unit : NetworkBehaviour
{
    public float MaxHP;
    [SyncVar(hook = "ChangHP")]
    public float currentHP;
    public Vector3 pos;
    public int price;
    public GameObject model;

    // 血量
    public bool isDisplayBlood;
    public Transform reTrBloodThis;// 本对象的血条位置

    #region 基本活动
    public virtual void BloodInit()
    {
    }
    public virtual void DrawHp()
    {
    }

    public virtual void BeAttacked(int att)
    {
    }
    public void ChangHP(float newHP)
    {
        currentHP = newHP;
    }
    #endregion
}
